<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrdersDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('orders_details', function (Blueprint $table) {
            $table->increments('id')->comment('订单详情表的id');
			$table->string('oid')->unique()->comment('订单id,关联订单表');
			$table->integer('gprice_id')->index()->comment('商品价格表id,关联商品价格表表');
			$table->double('deal_price')->comment('商品实际成交价格');
			$table->integer('buy_num')->comment('商品购买数量');
			$table->text('message',255)->comment('用户留言');
			$table->timestamps();
			$table->string('attr1' ,50)->nullable();
			$table->string('attr2' ,100)->nullable();
			$table->string('attr3' ,150)->nullable();
		});
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('orders_details');
    }
}